from pynput.mouse import Listener

print("将鼠标移动到你想要获取坐标的点并点击...")

def on_click(x, y, button, pressed):
    if pressed:  # 当鼠标按钮被按下时
        print(f"鼠标的当前位置: ({x}, {y})")
        return False  # 停止监听器

# 开始监听鼠标事件
with Listener(on_click=on_click) as listener:
    listener.join()